package com.time.sky.controller;


import com.time.sky.entity.Tower;
import com.time.sky.mapper.TowerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TowerController {

    @Autowired
    TowerMapper towerMapper;

    @CrossOrigin
    @RequestMapping("/tower/selectAll")
    public List<Tower> findAll(){
        List<Tower> all = towerMapper.findAll();
        return all;
    }
}
